﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using WpfBehaviorDemo.Models;

namespace WpfBehaviorDemo.ViewModels
{
    public class MainWindowViewModel
    {
        /// <summary>
        /// ObservableCollection为动态数据集合，已实现INotifyxxChanged接口
        /// </summary>
        public ObservableCollection<ShapeModel> Shapes { get; set; } = [];

        public MainWindowViewModel()
        {
            Shapes.Add(new ShapeModel() { ShapeName = "Ellipse", ShapeType = ShapeType.Ellipse, Fill = Brushes.Blue });
            Shapes.Add(new ShapeModel() { ShapeName = "Rectangle", ShapeType = ShapeType.Rectangle, Fill = Brushes.Red });
            Shapes.Add(new ShapeModel() { ShapeName = "Triangle", ShapeType = ShapeType.Triangle, Fill = Brushes.Green });
        }

    }
}
